<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    

    <title>添加管理员</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/static/manager/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/static/manager/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/static/manager/css/animate.min.css" rel="stylesheet">
    <link href="/static/manager/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        
        
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>增加管理员</h5>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal m-t">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">用户名：</label>
                                <div class="col-sm-8">
                                    <input name="user_name" class="form-control" type="text">
                                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请输入管理员用户名</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">昵称：</label>
                                <div class="col-sm-8">
                                    <input name="nickname" class="form-control" type="text">
                                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请输入管理员昵称</span>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">密码：</label>
                                <div class="col-sm-8">
                                    <input  name="user_password" class="form-control" type="password">
									<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请输入登录密码</span>
                                </div>
                            </div>
							
                            <div class="form-group">
                                <div class="col-sm-8 col-sm-offset-3">
                                    <button class="btn btn-primary" type="button" id="addbut">确定</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
       
    </div>
    <script src="/static/manager/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/manager/js/bootstrap.min.js?v=3.3.5"></script>
    <script src="/static/manager/js/content.min.js?v=1.0.0"></script>
    <script src="/static/manager/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="/static/manager/js/plugins/validate/messages_zh.min.js"></script>
    <script src="/static/manager/js/demo/form-validate-demo.min.js"></script>
    <script>
        $(function () {
            $("#addbut").click(function () {
                var user_name=$("input[name='user_name']").val();
                var nickname=$("input[name='nickname']").val();
                var user_password=$("input[name='user_password']").val();
                $.post("/manager/manager/admin_add_do",{user_name:user_name,nickname:nickname,user_password:user_password},function(result){
                    if(result==200){
                        window.location.href = "/manager/manager/index";
                    }else {
                        alert(result);
                    }

                });
            })

        })
    </script>
</body>

</html>